import { _decorator, Component, Node } from 'cc';
import { ModuleBase } from './ModuleBase';
import { colorType } from '../GameData';
const { ccclass, property } = _decorator;

@ccclass('CardDeck')
export class CardDeck extends ModuleBase {
    private static _instance:CardDeck=null;
    static get instance(){
        if(!this._instance){
            this._instance=new CardDeck();
        }
        return this._instance;
    }
    private cardnum:number=52;
    private Cardsnum:number=8;
    get Cardnum(){
        return this.Cardsnum;
    }

    onInit(...rest: any[]): void {
        this.SendMsg("init","CardMgr");
        this.SendMsg("shakeout","CardMgr");
        this.DrawCard(this.Cardsnum);

    }    
    //摸牌
    DrawCard(cardsnum:number){
        this.SendMsg("DrawCard","CardMgr",cardsnum);
    }
    //弃牌
    foldCard(){

    }
}


